<%@ tag pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ attribute name="name" required="true"%>
<%@ attribute name="caption" required="true"%>
<%@ attribute name="cols" required="false" %>

<div class="checkbox ${empty cols ? "": cols}">
    <%--value=true保证表单序列化时是true/false 否则是on/off 和后台无法对应 --%>
    <label><input type="checkbox" name="${name}" value="true"/>${caption}</label>
    <jsp:doBody/>
</div>